home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_b / reldoc.act < prev    next >
Text File  |  1995-04-22  |  3KB  |  113 lines

  1. Instructions for:
  2.  
  3.   RELGEN.ACT:== Relocation Generator
  4. & REOCAT.ACT:== Run-time Relocator
  5.  
  6.   These programs were intended to
  7. create a self-relocating object
  8. file from either an ACTION!
  9. compiled program or an Assembled
  10. program. The original object file
  11. must be a single-stage boot with
  12. only one origin except for the
  13. trailing run or init address. The
  14. following instructions detail the
  15. steps to make the target object
  16. file. This file may be appended to
  17. other binary load files and may
  18. have other binary files appended to
  19. it. The program will load at the
  20. next possible page boundary
  21. (increment of 256) after MEMLO.
  22. Because RELGEN compares two
  23. versions of you object file, you
  24. may want to init all variables to
  25. zero to keep the relocation table
  26. at a minimum. Stray data in the
  27. uninitialized variables may be
  28. interpreted as machine code that
  29. needs relocating.
  30.  
  31. 1) Compile (or Assemble) your code
  32.   at a convenient area but not
  33.   conflicting with DOS. In ACTION!,
  34.   use the following commands to
  35.   force the program's origin to a
  36.   specified value ($3000 for example):
  37.     SET 14=$3000
  38.     SET $491=$3000
  39.  
  40. 2) Re-Compile your code at $100
  41.   higher than the first. For the
  42.   above example, this would be at
  43.   $3100.
  44.  
  45. 3) From the ACTION! monitor, RUN the
  46. program RELGEN.ACT. It will prompt
  47. you for the filenames for the two
  48. object code files that you compiled
  49. above. Remember to give the Dn:
  50. prefix to the filenames. The program
  51. will compare the two object files
  52. and note their differences as offsets
  53. into the file. This information is
  54. saved in ACTION! form in a file with
  55. the original name and a ".GEN"
  56. extention. This will be used in the
  57. next step. Also, the program creates
  58. an object file image of the original
  59. but with an origin of zero. This is
  60. done to make the relocation process
  61. easier and this file, with a ".REL"
  62. extention will be used in step 5.
  63.  
  64.   Note: RELGEN.ACT requires four open
  65. DOS files simultaneously. By default,
  66. DOS usually has buffers for only 3.
  67. You must use the command:
  68.  
  69.   SET $709=4
  70.  
  71. in the ACTION! monitor and type D for
  72. DOS. Rewrite DOS to the disk and
  73. reboot. Now, DOS will allow the four
  74. files to be opened.
  75.  
  76. 4) Now, Read the program RELOC.ACT
  77. into the ACTION! Editor. This is a
  78. "generic" run-time relocator. The
  79. file generated with the RELGEN.ACT
  80. program (with the ".GEN" extention)
  81. must be merged into this program
  82. with the editor Read function.
  83. Position the cursor where instructed
  84. and read in the file. Compile this
  85. code but be sure that it is SET to
  86. compile above the expected end of
  87. YOUR program's target location.
  88. Save this object code to disk and
  89. go to DOS.
  90.  
  91. 5) Using the DOS Copy command,
  92. append the ".REL" file generated in
  93. RELGEN.ACT, to the merged relocator
  94. file saved in step 4. For example:
  95.  
  96. C
  97. Copy from,to:
  98. TEST.REL,AUTORUN.SYS/A
  99.  
  100. This assumes that you saved the file
  101. in Step 4 as AUTORUN.SYS.
  102.  
  103. 6) Finally, the appended file can be
  104. loaded from DOS or named AUTORUN.SYS
  105. as above for permanent applications.
  106.  
  107. If you have question, send E-Mail to:
  108.   John DeMar 71066,337 on Compuserve
  109. or leave a message on the ACE-BASE
  110. BBS at (315)451-7747. Good Luck!
  111.  
  112.  
  113. ⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧⇧